package com.luych.toolbox.common.feign.param.gateway.center;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("WebSocket事件")
public class WebSocketEvent {

    @ApiModelProperty("类型")
    private Type type;
    @ApiModelProperty("数据")
    private Object data;

    public WebSocketEvent(Type type, Object data) {
        this.type = type;
        this.data = data;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public static enum Type {
        HEARTBEAT, ONLINE, OFFLINE, SENDED,
        DATA_SOURCE_NORMAL, DATA_SOURCE_ABNORMAL,
        DATA_SOURCE_BACKUP_RUNNING, DATA_SOURCE_BACKUP_SUCCESS, DATA_SOURCE_BACKUP_ERROR,
        DATA_SOURCE_RECOVERY_RUNNING, DATA_SOURCE_RECOVERY_SUCCESS, DATA_SOURCE_RECOVERY_ERROR,
        DATA_SOURCE_UPGRADE_RUNNING, DATA_SOURCE_UPGRADE_SUCCESS, DATA_SOURCE_UPGRADE_ERROR,
        DATA_PROJECT_UPGRADE_RUNNING, DATA_PROJECT_UPGRADE_SUCCESS, DATA_PROJECT_UPGRADE_ERROR,
        DATA_AGENT_NORMAL, DATA_AGENT_ABNORMAL,
        DATA_BACKUP_RUNNING, DATA_BACKUP_SUCCESS, DATA_BACKUP_ERROR,
        DATA_RECOVERY_RUNNING, DATA_RECOVERY_SUCCESS, DATA_RECOVERY_ERROR,
        DATA_COMPARE_RUNNING, DATA_COMPARE_REMOVING, DATA_COMPARE_SUCCESS, DATA_COMPARE_ERROR,
        DATA_TRANSPORTER_RUNNING, DATA_TRANSPORTER_REMOVING, DATA_TRANSPORTER_SUCCESS, DATA_TRANSPORTER_ERROR,
        DATA_TRANSPORTER_TABLE_RUNNING, DATA_TRANSPORTER_TABLE_INCREASE, DATA_TRANSPORTER_TABLE_SUCCESS, DATA_TRANSPORTER_TABLE_ERROR,

        DOCKER_SERVER_NORMAL, DOCKER_SERVER_ABNORMAL,
        DOCKER_REGISTRY_NORMAL, DOCKER_REGISTRY_ABNORMAL,
        DOCKER_IMAGE_REFRESH, DOCKER_CONTAINER_REFRESH,

        SCRIPT_REFRESH,

        AUTO_SSH_SERVER_NORMAL, AUTO_SSH_SERVER_ABNORMAL,
        AUTO_TASK_TEMPLATE_REFRESH,
        AUTO_TASK_HISTORY_REFRESH, AUTO_TASK_HISTORY_RUNNING, AUTO_TASK_HISTORY_SUCCESS, AUTO_TASK_HISTORY_ERROR,
    }
}
